<div class="order-list-page" ng-if="pagedata.op == 'main'">
    <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">我的客户订单</div>
		<div class="fui-header-right"></div>
	</div>
	<div style="margin-top:58px"></div>
	<div id="tab" class="fui-tab fui-tab-danger">
        <a ng-class="{'external active':pagedata.status == 10}" href="javascript:" ng-click="pagedata.getlist(1,10)">全部</a>
        <a ng-class="{'external active':pagedata.status == 0}" href="javascript:" ng-click="pagedata.getlist(1,0)">待付款</a>
        <a ng-class="{'external active':pagedata.status == 1}" href="javascript:" ng-click="pagedata.getlist(1,1)">已付款</a>
        <a ng-class="{'external active':pagedata.status == 2}" href="javascript:" ng-click="pagedata.getlist(1,2)">已处理</a>
        <a ng-class="{'external active':pagedata.status == 3}" href="javascript:" ng-click="pagedata.getlist(1,3)">已取消</a>
        <a ng-class="{'external active':pagedata.status == 4}" href="javascript:" ng-click="pagedata.getlist(1,4)">已完成</a>
    </div>
	<div class='fui-content navbar order-list' style="top:2rem">
	<div class="fui-list-group order-item" ng-repeat="item in pagedata.list">
                <a ng-click="access_json('jy_quan/order/detail/id='+item.id)" class="fui-list external" style="padding: 0.42rem 0.5rem">
                    <div class="fui-list-inner">
                        <div class="subtitle"> 订单号: {{item.ordersn}}</div>
                    </div>
                    <div ng-show="item.status==0" class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">待付款</div>
                    <div ng-show="item.status==1" class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">已付款</div>
                    <div ng-show="item.status==2" class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">待确认</div>
                    <div ng-show="item.status==3" class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">已取消</div>
                    <div ng-show="item.status==4" class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">已完成</div>
                    <div class="angle"></div>
                </a> 
                    <a ng-click="access_json('jy_quan/order/detail/id='+item.id)">
                        <div class="fui-list-group-title lineblock">
                            <i class="icon jinyunicon icon-dianpu"></i> [{{item.typetitle || '互动活动'}}]-{{item.info.title}}
                            <span class="status noremark" style="font-size:0.50rem">状态：<span style="color:#f60;">{{item.typestatus}}</span></span>
                        </div>
                    </a>
                    <a class="external" data-nocache="true" ng-click="access_json('jy_quan/order/detail/id='+item.id)">
                        <div class="fui-list goods-list" ng-repeat="g in item.formdata.fileds">
                            <div class="fui-list-media" style="">
                                <img class="" ng-src="{{tomedia(g.image) || '../core/resource/images/nopic.jpg'}}">
                            </div>
                            <div class="fui-list-inner">
                                <div class="text goodstitle towline">{{g.title || '主题名称'}}</div>
                            </div>
                            <div class="fui-list-angle" style="width:4rem">
                                ￥<span class="marketprice">{{g.price || '0.00'}}</span></div>
                        </div>
                    </a>
				 <div class="fui-list-group-title lineblock" style="padding:0.3rem;line-height:1.4">
					<span class="bold"><i class="icon icon-ditu" style="color:#f60;font-size:0.50rem"></i> 配送方式
					</span> 
					<span>：{{item.info.groupsendsettitle}}</span>
					<span ng-if="item.info.groupsendset==1" style="color:#999;font-size:0.55rem">
						({{item.formdata.data[2].data.province}} {{item.formdata.data[2].data.city}} {{item.formdata.data[2].data.district}} {{item.formdata.data[2].data.xiangxi}})
					</span>
					<span ng-if="item.info.groupsendset==1 && item.status==2" style="color:#999;font-size:0.55rem">
						({{item.express.express_name || '快递公司'}} {{item.express.expresssn || '没有快递单号'}})
					</span>
                </div>
                <div class="fui-list-group-title lineblock">
					<span style="color:#999;font-size:0.55rem"><i class="icon jinyunicon icon-shijian" style="color:#f60;font-size:0.50rem"></i> {{item.createtime}}</span>
                    <span class="status noremark">共 <span>1</span> 个 实付: <span class="text-danger">￥{{item.fee}}</span></span>
                </div>
            <div class="fui-list-group-title lineblock opblock">
				<span class="status noremark">
					<div ng-if="item.status == 1 && pagedata.nofahuo!=1 && (item.info.groupsendset==1 || item.info.sendtype==1)" ng-click="pagedata.showfa(item.id)" class="btn btn-sm btn-danger-o order-finish">确认发货</div>
				</span>
            </div>
        </div>
	</div>
	<div class="content-empty" ng-show="pagedata.order_list.length == 0">
		  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有订单！</p>
	</div>
</div>
<div class="order-list-page" ng-if="pagedata.op == 'detail'">
	<style>
	.weui_cell_bd {
		padding: 0.3rem;
	}
	</style>
    <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">订单详情</div>
		<div class="fui-header-right"></div>
	</div>
	<div class='fui-content member-page navbar' style="top:0">
		<div class="fui-list-group merchgroup">
			<div class="fui-list jump">
                <a class="fui-list-media">
                    <img class="round" src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/nopic.jpg'}}" />
                </a>
                <div class="fui-list-inner">
					<div class="title" style="font-size:0.65rem">手机号：{{pagedata.member.mobile}}</div>
					<div class="title" style="font-size:0.65rem">昵称：{{pagedata.member.nickname}}</div>
					<div ng-if="pagedata.order.express.express_name" class="title" style="font-size:0.65rem">已发货：({{pagedata.order.express.express_name || '快递公司'}} {{pagedata.order.express.expresssn || '没有快递单号'}})</div>
                </div>
                <a class="jump" href="javascript:;">
					
				</a>
            </div>
		</div>
		<div style="padding:0 0.5rem">
		<div class="weui_cells" style="margin-top:0.5rem">
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>接龙标题</span>
					</div>
					<div class="weui_cell_ft" >{{pagedata.item.title}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>接龙类型</span>
					</div>
					<div class="weui_cell_ft" >{{pagedata.order.typetitle}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>下单人</span>
					</div>
					<div class="weui_cell_ft">{{pagedata.order.name}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>联系电话</span>
					</div>
					<div class="weui_cell_ft">{{pagedata.order.mobile}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>订单时间</span>
					</div>
					<div class="weui_cell_ft">{{pagedata.order.createtime}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>订单地址</span>
					</div>
					<div class="weui_cell_ft">{{pagedata.order.address}}</div>
			</div>
			<div ng-if="pagedata.order.remark" class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>备注</span>
					</div>
					<div class="weui_cell_ft">{{pagedata.order.remark}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>订单费用</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.order.fee">{{pagedata.order.fee}}元</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>实际支付</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.order.fee">{{pagedata.order.fee}}元</div>
			</div>
		</div>
		<div ng-if="pagedata.formdata.fileds.length>0"  href="javascript:;" ng-click="toogle(pagedata,'show1')" class="weui_cells_title">
		<strong style="font-size: 0.8rem;">接龙项目</strong> / <small>Con&nbsp;Jielong</small>
		<span class="r-f bold" style="color:#333"><i class="icon icon-moreunfold"></i></span>
		</div>
		<div ng-if="pagedata.show1" class="weui_cells" ng-repeat="group in pagedata.formdata.fileds">
				<div class="weui_cell" ng-repeat="f in group" ng-if="f.title">
						<div class="weui_cell_bd weui_cell_primary">
							<span>{{f.title}}</span>
						</div>
						<div ng-if="f.type !=18 && f.type !=3 && f.type !='option'" class="weui_cell_ft">{{f.data}}</div>
						<div ng-if="f.type ==3" class="weui_cell_ft">
							<ul class="weui_uploader_files" ng-if="f.data">
								  <li class="weui_uploader_file" style="background-image:url({{tomedia(f.data)}})"></li>
							</ul>
						</div>
						<div ng-if="f.type ==18" class="weui_cell_ft">￥<span class="price">{{f.data || '0.00'}}</span></div>
						<div ng-if="f.type =='option'" class="weui_cell_ft">
							<span class="jylabel jylabel-red" style="margin:0.2rem;line-height:1.2rem">{{f.data}}</span>
						</div>
				</div>
		</div>
		<div class="weui_cells_title" href="javascript:;" ng-click="toogle(pagedata,'show2')"><strong style="font-size: 0.8rem;">接龙内容</strong> / <small>Con&nbsp;Jielong</small>
		<span class="r-f bold" style="color:#333"><i class="icon icon-moreunfold"></i></span>
		</div>
		<div ng-if="pagedata.show2" class="weui_cells">
				<div class="weui_cell" ng-repeat="f in pagedata.formdata.data">
						<div class="weui_cell_bd weui_cell_primary">
							<span>{{f.title}}</span>
						</div>
						<div ng-if="f.type ==1 || f.type ==2 || f.type ==8 || f.type ==9 || f.type ==6" class="weui_cell_ft" ng-model="f.data">{{f.data}}</div>
						<div ng-if="f.type ==3 || f.type ==10" class="weui_cell_ft" ng-model="f.data">
						<ul class="weui_uploader_files" ng-if="f.data">
							  <li class="weui_uploader_file" style="background-image:url({{tomedia(f.data)}})"></li>
						</ul>
						</div>
						<div ng-if="f.type ==4" class="weui_cell_ft">
							<span class="jylabel jylabel-f60">{{f.value}}</span>
						</div>
						<div ng-if="f.type ==5" class="weui_cell_ft">
							<span class="jylabel jylabel-f60" ng-repeat="(k,v) in f.data track by $index">{{v}}</span>
						</div>
						<div ng-if="f.type ==7" class="weui_cell_ft">{{f.data.province}} {{f.data.district}} {{f.data.city}} {{f.data.xiangxi}}</div>
						<div ng-if="f.type ==18" class="weui_cell_ft">￥<span class="price">{{f.data || '0.00'}}</span></div>
				</div>
				<div ng-if="!pagedata.formdata.data || pagedata.formdata.data.length<1" class="weui_cell">
					<div class="content-empty" style="margin-top:0.5rem">
						  <p style="color: #999;font-size: .75rem">无接龙内容...</p>
					</div>
				</div>
		</div>
		<div class="weui_cells_title"  href="javascript:;" ng-click="toogle(pagedata,'show3')"><strong style="font-size: 0.8rem;">其他选填内容</strong> / <small>Con&nbsp;Jielong</small>
			<span class="r-f bold" style="color:#333"><i class="icon icon-moreunfold"></i></span>
		</div>
		<div ng-if="pagedata.show3" class="weui_cells">
				<div class="weui_cell" ng-repeat="f in pagedata.formdata.diydata">
						<div class="weui_cell_bd weui_cell_primary">
							<span>{{f.title}}</span>
						</div>
						<div ng-if="f.type ==1 || f.type ==2 || f.type ==6 || f.type ==8 || f.type ==9" class="weui_cell_ft">{{f.data}}</div>
						<div ng-if="f.type ==3 || f.type ==10" class="weui_cell_ft">
						<ul class="weui_uploader_files" ng-if="f.data">
							  <li class="weui_uploader_file" style="background-image:url({{tomedia(f.data)}})"></li>
						</ul>
						</div>
						<div ng-if="f.type ==4" class="weui_cell_ft">
							<span class="jylabel jylabel-f60">{{f.data}}</span>
						</div>
						<div ng-if="f.type ==5" class="weui_cell_ft">
							<span class="jylabel jylabel-f60" ng-repeat="(k,v) in f.data track by $index">{{v}}</span>
						</div>
						<div ng-if="f.type ==7" class="weui_cell_ft">{{f.data.province}} {{f.data.district}} {{f.data.city}} {{f.data.xiangxi}}</div>
						<div ng-if="f.type ==18" class="weui_cell_ft">￥<span class="price">{{f.data || '0.00'}}</span></div>
				</div>
				<div ng-if="!pagedata.formdata.diydata || pagedata.formdata.diydata.length<1" class="weui_cell">
					<div class="content-empty" style="margin-top:0.5rem">
						  <p style="color: #999;font-size: .75rem">无接龙内容...</p>
					</div>
				</div>
		</div>
		</div>
	</div>
</div>
<!--留言-->
<div id="showexpress"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">发货</div>
				</div>
				<div class="fui-cell">
						<div class="fui-cell-text">快递公司</div>					
						<div class="fui-cell-remark" style="color:#61bba7">
							<select class="r" ng-model="pagedata.post.express_id" name="expressno">
								<option ng-repeat="ex in pagedata.express" ng-selected="pagedata.post.express_id==ex.id" value="{{ex.id}}">{{ex.name}}</option>
							</select>
						</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-text">快递单号</div>
					<div class="fui-cell-text">
						<input type="text" placeholder="请输入快递单号" class="fui-input r" ng-model="pagedata.post.expresssn" id="subtitle" />
					</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a aria-hidden="true" data-dismiss="modal" ng-click="post(pagedata.post,'fa')" class="nav-item btn btn-success confirmbtn">确定</a>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script type="text/javascript">
scope.pagedata.showfa=function(id){
	scope.pagedata.post.id=id;
	$('#showexpress').modal();
}
if(scope.pagedata.op!='detail'){
	scope.loading = true;  //状态标记
	scope.isnodata = false;
	scope.pagedata.list =[];
	//滚动加载
	var page = 1;
	scope.pagedata.getlist=function(type,status){
			if(type==1){
				page = 1;
				scope.pagedata.list =[];
			}else{
				
			}
			if(status || status ==0){
				scope.pagedata.status = status;
			}else{
				status=10
				scope.pagedata.status = 10;
			}
			
			scope.get('jy_quan/order/list/page='+page+'&status='+status,
					function(data){
							if(data.error !=1){
									for (var i=0;i<data.list.length;i++){
										scope.pagedata.list.push(data.list[i]);
									}
									if(page >1){
										$(".fui-list-group").animate({scrollTop:0},300);
									}
									if(data.list.length<1){
										scope.isnodata=true;
									}
									page++;
									scope.loading = false;
									scope.$evalAsync();
									//getmpmansory();
							}else{
									console.log('error!');
							};
				});
	}
	scope.pagedata.getlist(1);
	scope.pagedata.scroll_bottom=function(){
		if(!scope.isnodata && !scope.loading){
			scope.pagedata.getlist();
		}
	}
}
</script>